package org.wanda.pv.model.business;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.nutz.dao.entity.annotation.*;
import org.wanda.pv.framework.base.BaseModel;
import org.wanda.pv.model.basic.Point;
import org.wanda.pv.model.hy.HyUserInfo;
import org.wanda.pv.model.user.SysUser;

/**
 * @author lxy
 * @date 2018/11/24 10:07
 */
@Table("wd_topic")
@Comment("审题内容流水表")
public class Topic extends BaseModel {
    @Column
    @Id
    @Prev(els = {@EL("$me.idGen()")})
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Comment("用户ID")
    @Column("hy_user_info_id")
    private Long hyUserInfoId;

    @One(field = "hyUserInfoId")
    private HyUserInfo hyUserInfo;

    @Column("content")
    @ColDefine(customType="LONGTEXT")
    private String content;

    @Comment("类型 0 回答 1回复")
    @Column("type")
    @ColDefine(type = ColType.INT,width = 2,notNull = true)
    private int type;

    @Comment("回答TOPIC的ID")
    @Column("topic_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long topicId;

    @Column("mark_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long markId;

    @One (field = "markId")
    private Mark mark;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getHyUserInfoId() {
        return hyUserInfoId;
    }

    public void setHyUserInfoId(Long hyUserInfoId) {
        this.hyUserInfoId = hyUserInfoId;
    }

    public HyUserInfo getHyUserInfo() {
        return hyUserInfo;
    }

    public void setHyUserInfo(HyUserInfo hyUserInfo) {
        this.hyUserInfo = hyUserInfo;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Long getTopicId() {
        return topicId;
    }

    public void setTopicId(Long topicId) {
        this.topicId = topicId;
    }

    public Long getMarkId() {
        return markId;
    }

    public void setMarkId(Long markId) {
        this.markId = markId;
    }

    public Mark getMark() {
        return mark;
    }

    public void setMark(Mark mark) {
        this.mark = mark;
    }

}
